import { BeanType, ReflectUtil } from "../di"
import { getBeanId } from "../common"

export function Controller(path: string) {
  return function (target) {
    const id = getBeanId(target)
    ReflectUtil.defineComponent(target, BeanType.Controller, id, { path })
    return target
  }
}
